package com.zhuidian.mothernote.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.recyclerview.widget.RecyclerView.ViewHolder;

import com.base.adapter.BaseRecyclerAdapter;
import com.zhuidian.mothernote.R;
import com.zhuidian.mothernote.bean.QuestionBean;


public class UserAdapter extends BaseRecyclerAdapter<QuestionBean> {

    public UserAdapter(Context context) {
        super(context);
    }

    @Override
    protected ViewHolder onCreateItemViewHolder(ViewGroup parent) {
        return new MyViewHolder(inflate(R.layout.adapter_user));
    }


    public class MyViewHolder extends ItemViewHolder {
        private ImageView iv_pic;
        private TextView tv_name;
        private TextView tv_fan;
        private TextView tv_agreement;
        private TextView tv_answer;
        private ImageView iv_follow;

        public MyViewHolder(View view) {
            super(view);

            iv_pic = (ImageView) view.findViewById(R.id.iv_pic);
            tv_name = (TextView) view.findViewById(R.id.tv_name);
            tv_fan = (TextView) view.findViewById(R.id.tv_fan);
            tv_agreement = (TextView) view.findViewById(R.id.tv_agreement);
            tv_answer = (TextView) view.findViewById(R.id.tv_answer);
            iv_follow = (ImageView) view.findViewById(R.id.iv_follow);

        }

        @Override
        protected void setListener(int position) {
                  iv_follow.setOnClickListener(new View.OnClickListener() {
                      @Override
                      public void onClick(View view) {

                      }
                  });
        }

        @Override
        protected void initValue(int position, QuestionBean questionBean) {

        }
    }

}


